﻿@model App.Web.ViewModels.UtilityModels.ListConfig
@using App.Core.Extensions
@using App.Web.ViewModels.UtilityModels
@using App.Web.Utility
@{
    String keyword = ViewBag.SearchType;
    String pageTitle = "Product Search Result";
    ViewBag.Title = Html.GetPageTitle(pageTitle);
    //ListConfig _ListConfig = Model;
    PagerConfig _PagerConfig = Model.Pager;
    ViewBag.DataSource = Model.DataSource;
    ViewBag.TotalRecord = Model.Pager.TotalRecord;
    _PagerConfig.UrlFormat = "/product/search?key=" + keyword + "&pageNo={0}";
    if (keyword.IsNullOrEmpty())
    {
        ViewBag.ShowMessage = false;
    }   
}

@Html.Partial("_ProductList")
@if (_PagerConfig != null && !keyword.IsNullOrEmpty())
{    
    @Html.Partial("_Pager", _PagerConfig)
}

